package edu.zut.hb.software.op.service.impl;


import java.util.ArrayList;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.op.dao.OpGroupDao;
import edu.zut.hb.software.op.domain.OpGroup;
import edu.zut.hb.software.op.service.OpGroupService;

@Service
@Transactional
public class OpGroupServiceImpl extends GenericTreeManagerImpl<OpGroup, Long>
        implements OpGroupService {


	OpGroupDao opGroupDao;

    @Autowired
    public void OpGroupDao(OpGroupDao opGroupDao) {
        this.opGroupDao = opGroupDao;
        this.treeDao=opGroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
            	OpGroup opGroup = new OpGroup();
            	opGroup.setName("名称"+i);
            	opGroup.setAddress("地址"+i);
            	opGroup.setPhone("号码"+i);
                list.add(opGroup);
            }
            return list;

        }




}
